home *** CD-ROM | disk | FTP | other *** search
/ Libris Britannia 4 / science library(b).zip / science library(b) / INFO / DOSTIPS5.ZIP / DOSKEYS < prev    next >
Text File  |  1987-10-05  |  5KB  |  149 lines

  1.                          A PC Typewriter
  2.           (PC Magazine Vol 5 No 13 July 1986 PC Tutor)
  3.  
  4.      You can make your PC act like a typewriter with the command:
  5.  
  6. COPY CON PRN
  7.  
  8. Although the COPY command is generally used for files, it can also copy
  9. between devices.  "CON" means console and refers to both the keyboard
  10. and screen.  It will be the keyboard in this case since that's where
  11. you're copying from.  "PRN" is your printer.  After you enter this
  12. command, you can start typing.  Press Enter after each line you type.
  13. If you make a mistake on a line, you can use the Backspace or Left
  14. Arrow key to correct it, but after you hit Enter, you're stuck with
  15. the line.  The text won't appear on the printer until you're done.
  16. To finish, press the F6 key (or Ctrl-Z) and press Enter.  This is an
  17. "End of File" signal for the COPY command.  The text will then be
  18. printed.  If you type a Ctrl-L before the Ctrl-Z, you'll get a formfeed
  19. after the text is printed.
  20.  
  21. -----------------------------------------------------------------
  22.                      ANSI.SYS Takes the Keys
  23.              (PC World August 1986 The Help Screen)
  24.  
  25.      ANSI.SYS enables you to redefine keys, although this capability
  26. is negligible compared to that of macro processors such as ProKey,
  27. SuperKey, and Keyworks. Many programs, including the BASIC interpreter,
  28. displace installed screen and keyboard drivers with their own.
  29. Nevertheless, assigning definitions to DOS function keys remains
  30. useful.  
  31.      Be sure the line DEVICE=ANSI.SYS is in your CONFIG.SYS file.  Then
  32. use KEY.BAT.  Once KEY.BAT is run, you can press <Alt>-0 to return the
  33. function keys to their default DOS assignments and press <Alt>-1 when
  34. you want to restore the definitions in KEY.BAT.
  35.  
  36. KEY.BAT:
  37.  
  38. echo off
  39. cls
  40. if on==%1 goto on
  41. if ON==%1 goto on
  42. if off==%1 goto off
  43. if OFF==%1 goto off
  44. goto help
  45. :on
  46. echo on
  47. prompt $e[0;59;"DIR "p
  48. prompt $e[0;60;"TYPE "p
  49. prompt $e[0;61;"COPY "p
  50. prompt $e[0;62;"ERASE "p
  51. prompt $e[0;63;"A: "p
  52. prompt $e[0;64;0;64p
  53. prompt $e[0;65;"B: "p
  54. prompt $e[0;66;"C: "p
  55. prompt $e[0;67;"D: "p
  56. prompt $e[0;68;"A:BASICA "
  57. prompt $e[0;120;"A:KEY ON";13p
  58. prompt $e[0;129;"A:KEY OFF";13p
  59. echo off
  60. cls
  61. echo The function keys have been redefined.
  62. echo Press Alt-0 when you want to return the default DOS definitions.
  63. echo Press Alt-1 when you want to restore these definitions.
  64. goto end
  65. :off
  66. echo on
  67. prompt $e[0;59;0;59p
  68. prompt $e[0;60;0;60p
  69. prompt $e[0;61;0;61p
  70. prompt $e[0;62;0;62p
  71. prompt $e[0;63;0;63p
  72. prompt $e[0;64;0;64p
  73. prompt $e[0;65;0;65p
  74. prompt $e[0;66;0;66p
  75. prompt $e[0;67;0;67p
  76. prompt $e[0;68;0;68p
  77. echo off
  78. cls
  79. echo The function keys have been returned to their default DOS definitions.
  80. echo Press Alt-1 when you want to restore the KEY.BAT definitions.
  81. echo Press Alt-0 when you want to return the default DOS definitions.
  82. goto end
  83. :help
  84. echo Type KEY ON to activate KEY.BAT key definitions
  85. :end
  86. prompt $p$g
  87.  
  88. -----------------------------------------------------------------
  89.                          Lone Star Look
  90.              (PC World September 1986 Star-Dot-Star)
  91.  
  92.      You can design a DOS prompt that displays the state flag of Texas
  93. on a color system when ANSI.SYS is installed.  The trick is adding
  94. ANSI.SYS commands to the DOS prompt.  When the prompt is displayed,
  95. the ANSI.SYS driver generates the image.  The $p$g near the end of the
  96. PROMPT command displays the current path and the greater-than symbol to
  97. the right of the flag.  When you actually create the PROMPT command,
  98. replace each of the 19 carets (^) with a space, and in the place of
  99. each of the 5 exclamation points, hold down the Alt key, type 223 on
  100. the numeric keypad, and then release the Alt key.
  101.      Instead of scrolling when it reaches the bottom of the screen,
  102. the flag prompt leaves a partially drawn image.  The image, though
  103. perhaps inelegant, is unique.
  104.  
  105. -----------------------------------------------------------------
  106.                           Forced Entry
  107.        (PC Magazine Vol 5 No 18 Oct 28, 1986 User-to-User)
  108.  
  109.      A certain battery-powered clock that sets the time and date
  110. requires the Enter key to be hit twice.  ENTER.COM places the scan
  111. code for the Enter key into the first two memory locations of the
  112. keyboard buffer.  Create ENTER.COM by using the ENTER.SCR file below,
  113. then redirect this script file into any version of DEBUG 2.0 or later
  114. with DEBUG < ENTER.SCR.  Then just precede the DATE and TIME commands
  115. in the AUTOEXEC.BAT file with the command ENTER.
  116.  
  117. N ENTER.COM
  118. A
  119. PUSH AX
  120. PUSH DS
  121. MOV AX,0040
  122. MOV DS,AX
  123. MOV AX,1C0D
  124. MOV [001E],AX
  125. MOV [0020],AX
  126. MOV AX,001E
  127. MOV [001A],AX
  128. MOV AX,0022
  129. MOV [001C],AX
  130. POP DS
  131. POP AX
  132. INT 20
  133.  
  134. RCX
  135. 20
  136. W
  137. Q
  138.  
  139. Editor's Note:  It's crazy for a board manufacturer to insist that
  140. users hit the Enter key manually to read the time and date from a
  141. clock into DOS.  Preceding TIME and DATE with ENTER will save the
  142. manual key taps, but it's just as easy to create a small file called
  143. CR that contains nothing but a carriage return and then redirect it
  144. into DOS:
  145.  
  146. TIME < CR
  147. DATE < CR
  148.  
  149.